﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SingletonPattern.utils
{
    class InvalidType : System.Exception
    {
        private string m_message;
        public InvalidType()
        {
            m_message = "";
        }

        public InvalidType(string message)
        {
            m_message = message;
        }

        public void InvalidTypeException()
        {
            System.Windows.Forms.MessageBox.Show(m_message + " invalid type!");
        }
    }

    class InvalidString : System.Exception
    {
        private string m_message;
        public InvalidString()
        {
            m_message = "";
        }

        public InvalidString(string message)
        {
            m_message = message;
        }

        public void InvalidStringException()
        {
            System.Windows.Forms.MessageBox.Show(m_message + " is null or empty!");
        }
    }

    class InvalidLimitString : System.Exception
    {
        private string m_message;
        public InvalidLimitString()
        {
            m_message = "";
        }

        public InvalidLimitString(string message)
        {
            m_message = message;
        }

        public void InvalidLimitStringException()
        {
            System.Windows.Forms.MessageBox.Show("Charaters must be in " + m_message);
        }
    }

    class InvalidNumber : System.Exception
    {
        private string m_message;
        public InvalidNumber()
        {
            m_message = "";
        }

        public InvalidNumber(string message)
        {
            m_message = message;
        }

        public void InvalidNumberException()
        {
            System.Windows.Forms.MessageBox.Show("Invalid number for " + m_message);
        }
    }
}
